home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / HyperCard Related / APDA HyperCard Toolkits / HyperCard Video Toolkit 2.0 / HVT #2 / Advanced Material / Video Sources / videoFrame.p < prev    next >
Encoding:
Text File  |  1995-02-07  |  1.3 KB  |  66 lines  |  [TEXT/MPS ]

  1. (*
  2.     videoFrame() -- Return the frame number of the frame the player is currently displaying.
  3.  
  4.     To compile and link this file using Macintosh Programmer's Workshop,
  5.  
  6.         pascal -w videoFrame.p
  7.  
  8.         link -m ENTRYPOINT -o HyperCommands -rt XFCN=8002 -sn Main=videoFrame ∂
  9.             videoFrame.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o
  10.  
  11.     Copyright © 1987,88 Apple Computer, Inc.
  12.  
  13.     9/87 - Initial coding by Harry R. Chesley.
  14.     2/88 - Changed for new interface specification by Harry R. Chesley.
  15. *)
  16.  
  17. {$R-}
  18.  
  19. {$S videoFrame }     { Segment name must be the same as the command name. }
  20.  
  21. unit DummyUnit;
  22.  
  23. interface
  24.  
  25. uses MemTypes, QuickDraw, OSIntf, ToolIntf, HyperXCmd;
  26.  
  27. procedure EntryPoint(paramPtr: XCmdPtr);
  28.     
  29. implementation
  30.  
  31. type
  32.  
  33. Str31 = String[31];
  34.  
  35. procedure videoFrame(paramPtr: XCmdPtr); forward;
  36.  
  37. procedure EntryPoint(paramPtr: XCmdPtr);
  38.  
  39.     begin
  40.         videoFrame(paramPtr);
  41.     end;
  42.  
  43. procedure videoFrame(paramPtr: XCmdPtr);
  44.  
  45.     {$I XCmdGlue.inc}
  46.  
  47.     procedure Fail(errMsg: Str255); { set theResult and quit }
  48.         begin
  49.             paramPtr^.returnValue := PasToZero(errMsg);
  50.             exit(videoFrame);
  51.         end;
  52.  
  53.     {$I VideoUtil.inc}
  54.  
  55.     begin
  56.         if paramPtr^.paramCount <> 0 then Fail('parameter count is not 0');
  57.  
  58.         { Clear out any pending input. }
  59.         EvalAndDispose('recvUpTo(empty,0,empty)');
  60.  
  61.         { Get the current frame number... }
  62.         paramPtr^.returnValue := PasToZero(videoFunc('frame',''))
  63.     end;
  64.  
  65. end.
  66.